package com.yanqu.road.server.cmd.activity.biaoju;

import com.yanqu.road.logic.pb.PlayerBasePb;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.BiaoJuProto;
import com.yanqu.road.pb.activity.ZhenHuanProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.biaoju.CrossBiaoJuActivity;
import com.yanqu.road.server.manager.activity.biaoju.CrossBiaoJuMgr;
import com.yanqu.road.server.manager.user.CrossUserMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_BIAOJU_DEBUG_CMD, desc = "调试用")
public class CrossBiaoJuDebugCmd extends CrossUnionCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ZhenHuanProto.CrossZhenHuanThirdProcessDebugReqMsg reqMsg = ZhenHuanProto.CrossZhenHuanThirdProcessDebugReqMsg.parseFrom(packet.getBytes());

        CrossBiaoJuActivity activity = CrossBiaoJuMgr.getActivity(reqMsg.getActivityId(), groupId);
        if (activity == null) {
            return;
        }
        activity.debugByCmd(packet.getPlayerId(), reqMsg);
    }

    @Override
    public void sendData() {

    }
}
